<?php
   include("./dbconn.php");

   //获取编辑后新的商品信息
  //  $title = $_GET["title"];
  //  $imgUrl = $_GET["imgUrl"];
  //  $hot = $_GET["hot"];

    $title = '模拟数据1';
    $imgUrl = '//cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/c61933e7ac89c61bc727c275391e82e0.png?thumb=1&w=40&h=40';
    $hot = '1';
    $Id = 178;


   $sql = "update midata set title='$title',imgUrl='$imgUrl',hot='$hot' where Id=$Id";

    if ($conn->query($sql) === true){
       $data["code"] = 0;
    }else{
         $data["code"] =1;
    }
   echo json_encode($data);
?>